package com.css.project.oa.fileInfo.service.impl;

import java.util.List;

import com.css.project.oa.fileInfo.domain.SysFileInfo;
import com.css.project.oa.fileInfo.mapper.SysFileInfoMapper;
import com.css.project.oa.fileInfo.service.ISysFileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 附件信息Service业务层处理
 *
 * @author css
 * @date 2020-05-13
 */
@Service
public class SysFileInfoServiceImpl implements ISysFileInfoService
{
    @Autowired
    private SysFileInfoMapper sysFileInfoMapper;

    /**
     * 查询附件信息
     *
     * @param fileId 附件信息ID
     * @return 附件信息
     */
    @Override
    public SysFileInfo selectSysFileInfoById(Long fileId)
    {
        return sysFileInfoMapper.selectSysFileInfoById(fileId);
    }

    /**
     * 查询附件信息列表
     *
     * @param sysFileInfo 附件信息
     * @return 附件信息
     */
    @Override
    public List<SysFileInfo> selectSysFileInfoList(SysFileInfo sysFileInfo)
    {
        return sysFileInfoMapper.selectSysFileInfoList(sysFileInfo);
    }

    /**
     * 新增附件信息
     *
     * @param sysFileInfo 附件信息
     * @return 结果
     */
    @Override
    public int insertSysFileInfo(SysFileInfo sysFileInfo)
    {
        return sysFileInfoMapper.insertSysFileInfo(sysFileInfo);
    }

    /**
     * 修改附件信息
     *
     * @param sysFileInfo 附件信息
     * @return 结果
     */
    @Override
    public int updateSysFileInfo(SysFileInfo sysFileInfo)
    {
        return sysFileInfoMapper.updateSysFileInfo(sysFileInfo);
    }

    /**
     * 批量删除附件信息
     *
     * @param fileIds 需要删除的附件信息ID
     * @return 结果
     */
    @Override
    public int deleteSysFileInfoByIds(Long[] fileIds)
    {
        return sysFileInfoMapper.deleteSysFileInfoByIds(fileIds);
    }

    /**
     * 删除附件信息信息
     *
     * @param fileId 附件信息ID
     * @return 结果
     */
    @Override
    public int deleteSysFileInfoById(Long fileId)
    {
        return sysFileInfoMapper.deleteSysFileInfoById(fileId);
    }
}